package org.supda.system.controller.monitor;

import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.supda.system.controller.common.BaseController;
import org.supda.system.entity.system.SystemPropertySingleton;
import org.supda.system.service.TMessageService;

/**
 * 服务器器信息
 * @author supda
 * @Date 2017-2-24 下午2:22:37
 *
 */
@Controller
@RequestMapping("/server")
public class ServerController extends BaseController{

	@Inject private TMessageService serverInfoService;
	
	/**
	 * 进入服务器信息页面
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping(value = {"/",""},method=RequestMethod.GET, produces="text/html;charset=utf-8")
	public String server(HttpServletRequest request, Model model){
		
		SystemPropertySingleton systemProperty = serverInfoService.revertAllSystemProperty();
		model.addAttribute("systemProperty", systemProperty);
		
		return SYSTEM_MONITOR_VIEW_PACKAGE+"server/server";
	}
	
	
}
